package client.console;

import common.events.EventTypes;
import common.events.IEventSubscriber;
import common.packets.MessagePacket;

public class Console implements IEventSubscriber {

	public void handleEvent(EventTypes eType, Object data) {
		
		switch (eType) {
		case COMM_MESSAGE:
			handleMessage((MessagePacket)data);
			break;
		default:
			System.out.println("console: nothing yet");
			break;
		}
	}

	private void handleMessage(MessagePacket data) {
		System.out.println(data.getSender() + ": " + data.getMessage());
		
	}

}
